#!/usr/bin/env python

import wx

import resource as r

class MenuBar(wx.MenuBar):
    '''MenuBar class
    
    @author Julot <andy.julot@gmail.com>
    @since Thursday, February 02, 2012. 10:47 PM'''
    
    def __init__(self, *args, **kwargs):
        wx.MenuBar.__init__(self, *args, **kwargs)
        self.file = File()
        self.Append(self.file, r.string.menu.main.file.label)
        self.message = Message()
        self.Append(self.message, r.string.menu.main.message.label)
        self.help = Help()
        self.Append(self.help, r.string.menu.main.help.label)

class File(wx.Menu):
    '''File class
    
    @author Julot <andy.julot@gmail.com>
    @since Thursday, February 02, 2012. 09:54 PM'''
    
    def __init__(self, *args, **kwargs):
        wx.Menu.__init__(self, *args, **kwargs)
        
        self.close = wx.MenuItem(self, -1, r.string.menu.file.quit.label,
                                 r.string.menu.file.quit.help)
        self.close.Bitmap = r.toolbar.DoorOpenOut.Bitmap
        self.AppendItem(self.close)

class Message(wx.Menu):
    '''Message class
    
    @author Julot <andy.julot@gmail.com>
    @since Thursday, February 16, 2012. 08:32 AM'''
    
    def __init__(self, *args, **kwargs):
        wx.Menu.__init__(self, *args, **kwargs)
        
        self.archive = wx.MenuItem(self, -1,
                                   r.string.menu.message.archive.label,
                                   r.string.menu.message.archive.help)
        self.archive.Bitmap = r.toolbar.FolderZipper.Bitmap
        self.AppendItem(self.archive)
        self.archive.Enable(False)
        
        self.delete = wx.MenuItem(self, -1,
                                  r.string.menu.message.delete.label,
                                  r.string.menu.message.delete.help)
        self.delete.Bitmap = r.toolbar.CrossScript.Bitmap
        self.AppendItem(self.delete)
        self.delete.Enable(False)
        
        self.recover = wx.MenuItem(self, -1,
                                   r.string.menu.message.recover.label,
                                   r.string.menu.message.recover.help)
        self.recover.Bitmap = r.toolbar.ArrowContinue090Left.Bitmap
        self.AppendItem(self.recover)
        self.recover.Enable(False)
        
        self.AppendSeparator()
        
        self.read = wx.MenuItem(self, -1,
                                r.string.menu.message.read.label,
                                r.string.menu.message.read.help)
        self.read.Bitmap = r.toolbar.DatabaseImport.Bitmap
        self.AppendItem(self.read)
        
        self.AppendSeparator()
        
        self.export = wx.MenuItem(self, -1,
                                  r.string.menu.message.export.label,
                                  r.string.menu.message.export.help)
        self.export.Bitmap = r.toolbar.DocumentExcel.Bitmap
        self.AppendItem(self.export)

class Help(wx.Menu):
    '''Help class
    
    @author Julot <andy.julot@gmail.com>
    @since Thursday, February 02, 2012. 10:48 PM'''
    
    def __init__(self, *args, **kwargs):
        wx.Menu.__init__(self, *args, **kwargs)
        
        self.index = wx.MenuItem(self, -1, r.string.menu.help.index.label,
                                 r.string.menu.help.index.help)
        self.index.Bitmap = r.toolbar.QuestionButton.Bitmap
        self.AppendItem(self.index)
        
        self.AppendSeparator()
        
        self.about = wx.MenuItem(self, -1, r.string.menu.help.about.label,
                                 r.string.menu.help.about.help)
        self.about.Bitmap = r.toolbar.About.Bitmap
        self.AppendItem(self.about)
        